import java.util.Objects;
import java.util.Scanner;
public class demo6 {
    public static void main(String[]args){
        System.out.println("请输入本次购物价格");
        Scanner sc=new Scanner(System.in);
        double price = sc.nextDouble();
        System.out.println("亲，包邮吗？(回答：yes or no)" );
        String answer= sc.next();
        if(Objects.equals(answer, "yes")){
            System.out.println("实际付款价格为："+price);
        }
        else if(Objects.equals(answer, "no")){
            double pay=price+20;
            System.out.println("实际付款价格为："+pay);
        }
    }
}
